Page({
  onLoad() {
    this.getList()
  },
  async getList() {
    const res = await wx.http.get('/visitor', {
      current: 1,
      pageSize: 10,
    })
    if (res.code !== 10000) return wx.utils.toast()

    this.setData({
      list: res.data.rows,
    })
  },
  goPassport(ev) {
    wx.navigateTo({
      url: '/visitor_pkg/pages/passport/index?id=' + ev.mark.id,
    })
  },
})
